.class public final Llt/farmis/libraries/shape_import_android/models/ShapeModel;
.super Ljava/lang/Object;
.source "ShapeModel.kt"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Llt/farmis/libraries/shape_import_android/models/ShapeModel$Companion;
    }
.end annotation


# static fields
.field public static final Companion:Llt/farmis/libraries/shape_import_android/models/ShapeModel$Companion;


# instance fields
.field private coordinates:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "+",
            "Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;",
            ">;"
        }
    .end annotation
.end field

.field private description:Ljava/lang/String;

.field private name:Ljava/lang/String;

.field private primaryColor:Ljava/lang/Integer;

.field private secondaryColor:Ljava/lang/Integer;

.field private type:Llt/farmis/libraries/shape_import_android/ShapeImport$Shape;

.field private uniqueId:Ljava/lang/String;


# direct methods
.method static constructor <clinit>()V
    .locals 2

    new-instance v0, Llt/farmis/libraries/shape_import_android/models/ShapeModel$Companion;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Llt/farmis/libraries/shape_import_android/models/ShapeModel$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V

    sput-object v0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->Companion:Llt/farmis/libraries/shape_import_android/models/ShapeModel$Companion;

    return-void
.end method

.method public constructor <init>(Llt/farmis/libraries/shape_import_android/ShapeImport$Shape;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Llt/farmis/libraries/shape_import_android/ShapeImport$Shape;",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "Ljava/util/List<",
            "+",
            "Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;",
            ">;",
            "Ljava/lang/String;",
            "Ljava/lang/Integer;",
            "Ljava/lang/Integer;",
            ")V"
        }
    .end annotation

    const-string v0, "type"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "name"

    invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "description"

    invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "coordinates"

    invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const-string v0, "uniqueId"

    invoke-static {p5, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 12
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->type:Llt/farmis/libraries/shape_import_android/ShapeImport$Shape;

    iput-object p2, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->name:Ljava/lang/String;

    iput-object p3, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->description:Ljava/lang/String;

    iput-object p4, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->coordinates:Ljava/util/List;

    iput-object p5, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->uniqueId:Ljava/lang/String;

    iput-object p6, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->primaryColor:Ljava/lang/Integer;

    iput-object p7, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->secondaryColor:Ljava/lang/Integer;

    return-void
.end method

.method public constructor <init>(Lorg/json/JSONObject;)V
    .locals 11

    const-string v0, "json"

    invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 22
    sget-object v0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->Companion:Llt/farmis/libraries/shape_import_android/models/ShapeModel$Companion;

    sget-object v1, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->INSTANCE:Llt/farmis/libraries/shape_import_android/generators/FamMaker;

    invoke-virtual {v1}, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->getTAG_TYPE()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const-string v2, "json.optString(FamMaker.TAG_TYPE)"

    invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Llt/farmis/libraries/shape_import_android/models/ShapeModel$Companion;->parseType(Ljava/lang/String;)Llt/farmis/libraries/shape_import_android/ShapeImport$Shape;

    move-result-object v4

    .line 23
    sget-object v0, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->INSTANCE:Llt/farmis/libraries/shape_import_android/generators/FamMaker;

    invoke-virtual {v0}, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->getTAG_NAME()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string v0, "json.optString(FamMaker.TAG_NAME)"

    invoke-static {v5, v0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 24
    sget-object v0, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->INSTANCE:Llt/farmis/libraries/shape_import_android/generators/FamMaker;

    invoke-virtual {v0}, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->getTAG_DESCRIPTION()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    const-string v0, "json.optString(FamMaker.TAG_DESCRIPTION)"

    invoke-static {v6, v0}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    .line 25
    sget-object v0, Llt/farmis/libraries/shape_import_android/utils/WktUtils;->INSTANCE:Llt/farmis/libraries/shape_import_android/utils/WktUtils;

    sget-object v1, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->INSTANCE:Llt/farmis/libraries/shape_import_android/generators/FamMaker;

    invoke-virtual {v1}, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->getTAG_COORDINATES()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {p1, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const-string v2, "json.optString(FamMaker.TAG_COORDINATES)"

    invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Llt/farmis/libraries/shape_import_android/utils/WktUtils;->getWKT2Points(Ljava/lang/String;)Ljava/util/List;

    move-result-object v7

    if-eqz v7, :cond_0

    .line 26
    sget-object v0, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->INSTANCE:Llt/farmis/libraries/shape_import_android/generators/FamMaker;

    invoke-virtual {v0}, Llt/farmis/libraries/shape_import_android/generators/FamMaker;->getTAG_UN_ID()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    const-string p1, "json.optString(FamMaker.TAG_UN_ID)"

    invoke-static {v8, p1}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V

    const/4 v9, 0x0

    const/4 v10, 0x0

    move-object v3, p0

    .line 21
    invoke-direct/range {v3 .. v10}, Llt/farmis/libraries/shape_import_android/models/ShapeModel;-><init>(Llt/farmis/libraries/shape_import_android/ShapeImport$Shape;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Integer;)V

    return-void

    .line 25
    :cond_0
    invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V

    const/4 p1, 0x0

    throw p1
.end method


# virtual methods
.method public final getCoordinates()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Llt/farmis/libraries/shape_import_android/intefaces/LatLngInterface;",
            ">;"
        }
    .end annotation

    .line 16
    iget-object v0, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->coordinates:Ljava/util/List;

    return-object v0
.end method

.method public final getDescription()Ljava/lang/String;
    .locals 1

    .line 15
    iget-object v0, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->description:Ljava/lang/String;

    return-object v0
.end method

.method public final getName()Ljava/lang/String;
    .locals 1

    .line 14
    iget-object v0, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->name:Ljava/lang/String;

    return-object v0
.end method

.method public final getType()Llt/farmis/libraries/shape_import_android/ShapeImport$Shape;
    .locals 1

    .line 13
    iget-object v0, p0, Llt/farmis/libraries/shape_import_android/models/ShapeModel;->type:Llt/farmis/libraries/shape_import_android/ShapeImport$Shape;

    return-object v0
.end method
